import React from 'react';
import { Tag } from 'antd';

const OrderStatusTag = ({ status }) => {
  const renderTag = (status) => {
    switch (status) {
      case 0:
        return <Tag color="red">已取消</Tag>;
      case 1:
        return <Tag>待支付</Tag>;
      case 2:
        return <Tag color="blue">已完成</Tag>;
      default:
        return <Tag>未知状态</Tag>;
    }
  };

  return <>{renderTag(status)}</>;
};

export default OrderStatusTag;